/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.logiclander.whozwho.data.dao.hibernate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.NaturalId;


/**
 *
 * @author logiclander
 */
@Entity
@Table( name = "PRINCIPALS" )
public class Principal {
  private long sid;
  private String name;
  private boolean activeIndicator;

  @Id
  @GeneratedValue(generator = "increment")
  @GenericGenerator(name = "increment", strategy = "increment")
  @Column(name = "principal_sid", nullable = false)
  public Long getSid() {
    return sid;
  }

  public void setSid(long sid) {
    this.sid = sid;
  }

  @NaturalId
  @Column(name = "principal_name", nullable = false)
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  @Column(name = "active_indicator", nullable = false)
  public boolean getActiveIndicator() {
    return activeIndicator;
  }

  public void setActiveIndicator(boolean activeIndicator) {
    this.activeIndicator = activeIndicator;
  }

}
